package MethodAnnotations;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Author quan
 * @Description 方法注解
 * @Date 2023/7/12 22:21
 */

@Configuration
public class BeanConfig {
    @Bean
    public User User1(){
        User user = new User();
        user.setName("zhangsan");
        user.setAge(18);
        return user;
    }
    @Bean
    public User user2() {
        User user = new User();
        user.setName("lisi");
        user.setAge(20);
        return user;
    }
}
